<template>
  <div class="departMent">
    <el-tree :data="data"
    :props="defaultProps" @node-click="handleNodeClick"></el-tree>
  </div>
</template>

<script>
export default {
  name:"departMent",
    data() {
      return {
        data: [ {
          label: '传智教育',
          children: [{
            label: '总裁办',
          }, {
            label: '行政部',
          },
          {
            label: '人事部',
            children: [{
              label: '财务核算部'
            },
            {
              label: '税务管理部'
            },
            {
              label: '薪资管理部'
            }]
          },
          {
            label: '财务部',
            children: [{
              label: 'PHP开发部'
            },]
          },
          {
            label: '技术部',
          },
          {
            label: '运营部',
            children: [{
              label: '上海事务部'
            },
            {
              label: '北京事务部'
            }]
          },
          {
            label: '市场部',
          }
      ]
        },],
        defaultProps: {
          children: 'children',
          label: 'label'
        }
      };
    },
    methods: {
      handleNodeClick(data) {
        console.log(data);
      }
    }
  };
</script>

<style>
.el-tree-node__content {
    height: 53px !important;
}
</style>